<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>switch</title>
</head>
<body>
<button onclick="funA()">点我一下</button>
</body>
<script>
    /*
      if 是用于判断的， 用于判断区间的
     */

    function funA() {
        var num = 3

        switch (num) {
            case 1:
                console.log("一")
                break;
            case 2:
                console.log("二")
                break;
            case 3:
                console.log("三")
                break;
        }
        console.log("程序结束了")

    }
</script>
</html>